Skip to content

feat/step-hook-timeout-resumption#549

Merged
yasha-dev1 merged 2 commits into
mainfrom
feat/step-hook-timeout-resumption
Jul 5, 2026
Merged

feat/step-hook-timeout-resumption#549
yasha-dev1 merged 2 commits into
mainfrom
feat/step-hook-timeout-resumption

Conversation

@yasha-dev1

Copy link
Copy Markdown
Collaborator

No description provided.

yasha-dev1 and others added 2 commits July 5, 2026 19:03
…sentinel

step_hook(on_timeout="return") now carries the hook deadline on its
SuspensionSignal; the Celery step executor schedules a workflow resume at
that deadline (triggered_by=step_hook_timeout). On re-execution past the
deadline the call returns the STEP_HOOK_TIMEOUT sentinel instead of
re-suspending, so a hook nobody resumes can no longer suspend a workflow
forever. Default on_timeout="suspend" preserves existing behavior.

Motivated by the 2026-07-02 FlowHunt incident: loop steps need a durable
tick (suspend with deadline, wake early on resume_hook) that cannot hang
when all external resumers die.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…diate resumes

A deadline (countdown) resume_workflow task holds its singleton lock for the
entire countdown, silently swallowing every immediate resume — including
resume_hook wake-ups — enqueued for the same run in the meantime. Observed
live: step_hook(on_timeout="return") ticks only advanced at deadline cadence
because iteration wake-ups were dropped at enqueue.

resume_workflow_task now dedupes on (run_id, dedup_scope); delayed resumes get
scope "deadline", immediate ones "immediate". generate_lock applies signature
defaults so existing callers keep matching keys. Extra resume executions
remain harmless (try_claim_run drops all but the first).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@yasha-dev1 yasha-dev1 merged commit 8d54381 into main Jul 5, 2026
7 checks passed
@yasha-dev1 yasha-dev1 deleted the feat/step-hook-timeout-resumption branch July 5, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant